package com.wman.mvp.ui.activity.welcome

import com.wman.R
import com.wman.mvp.base.BaseActivity
import kotlinx.android.synthetic.main.activity_mvp_welcome.*

class MvpWelcomeActivity : BaseActivity<MvpWelcomeView, MvpWelcomePresenter>(), MvpWelcomeView {
    override fun getLayoutId(): Int = R.layout.activity_mvp_welcome

    override fun createPresenter() = MvpWelcomePresenter()

    override fun init() {
        buttomSetData.setOnClickListener {
            getPresenter()!!.setText("""TextView""")
            getPresenter()!!.getText()
        }
    }

    override fun initData() {
    }

    override fun <T> setData(data: T) {
        tvText.text = data.toString()
    }

    override fun setError(err: String) {
    }
}
